//ajaxURL
//var urls = 'http://192.168.1.83';
var urls = window.location.origin;

//获取URL参数方法
var test = window.location.search;
function GetQueryString(name) {
	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
	var r = window.location.search.substr(1).match(reg);
	if(r != null) return decodeURI(r[2]);
	return null;
}

// 立即下载
function downApp(){
	var u = navigator.userAgent, 
	isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1 || u.indexOf('Linux') > -1,
	isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
	urls = {
		'android':'http://47.75.137.136/group1/M00/00/00/rB9JKVseRZeAV-Q7AIkCKTaNPr8376.apk',
		'ios':'https://fir.im/2lfj',
	};
	if(isAndroid){
		//判断是否微信浏览器打开
		var ua = navigator.userAgent.toLowerCase();
		if(ua.match(/MicroMessenger/i) == "micromessenger") {
			// 是
			document.getElementById("popup").style.display = "block";
			window.location.href=urls.android;
		} else {
			window.location.href=urls.android;
			document.getElementById("popup").style.display = "none";
		}
	} else if(isiOS){
		window.location.href=urls.ios;
	}
}
//关闭提示层
function tanX() {
	document.getElementById("popup").style.display = "none";
}
